import HTTP from '../utils/http';
import { API } from '../config/config';
export default class ApiService extends HTTP{
    findEssay(data){
        return new Promise((resolve)=>{
            this.axiosPost({
                url:ESSAY.ESSAY_GET,
                data,
                success(data){
                    axiosMessageShow(data);
                    resolve(data.data)
                },error(error){
                    Message({
                        message:error,
                        type:'error'
                    })
                }
            })
          })  
    }
    findFirendLink(id) {
        return new Promise((resolve)=>{
          this.axiosPost({
              url:FIRENDLINK.FIREND_GET,
              data:id,
              success(data){
                  axiosMessageShow(data);
                  resolve(data.data)
              },error(error){
                  Message({
                      message:error,
                      type:'error'
                  })
              }
          })
        })  
      }
}